﻿cmake_minimum_required(VERSION 3.5)

project(GPlayer LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# QtCreator supports the following variables for Android, which are identical to qmake Android variables.
# Check http://doc.qt.io/qt-5/deployment-android.html for more information.
# They need to be set before the find_package(Qt5 ...) call.


find_package(Qt5 COMPONENTS Core Gui Widgets Multimedia REQUIRED)

file(GLOB_RECURSE QRC_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.qrc)

set(QRC_SOURCE_FILES res.qrc)
qt5_add_resources(QRC_FILES ${QRC_SOURCE_FILES})


add_executable(GPlayer WIN32
    main.cpp
    gplayer.cpp
    gplayer.h
    gplayer.ui
    icon.rc
    ${QRC_FILES}
    songinfo.h
    songinfo.cpp
    textticker.h
    textticker.cpp
    option.cpp
    option.h
    option.ui
)

target_link_libraries(GPlayer PRIVATE Qt5::Core)
target_link_libraries(GPlayer PRIVATE Qt5::Gui)
target_link_libraries(GPlayer PRIVATE Qt5::Widgets)
target_link_libraries(GPlayer PRIVATE Qt5::Multimedia)
